package com.microservice.salmon.db.entities;

import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import javax.persistence.*;

@Table(name = "t_shops")
@Data
@EqualsAndHashCode(of = "shopId")
public class Shop implements Serializable {

    private static final long serialVersionUID = -2152801505379619881L;
    /**
     * 自增主键
     */
    @Id
    @Column(name = "shop_id")
    private Integer shopId;

    /**
     * 门店编号
     */
    @Column(name = "shop_sn")
    private String shopSn;

    /**
     * 门店所有人ID
     */
    @Column(name = "user_id")
    private Integer userId;

    /**
     * 区域路径
     */
    @Column(name = "region_id_path")
    private String regionIdPath;

    /**
     * 最终所属区域ID
     */
    @Column(name = "region_id")
    private Integer regionId;

    /**
     * 是否自营 1:自营 0:非自营
     */
    @Column(name = "is_self")
    private Byte isSelf = Byte.valueOf("0");

    /**
     * 门店名称
     */
    @Column(name = "shop_name")
    private String shopName;

    /**
     * 店主
     */
    @Column(name = "shop_keeper")
    private String shopKeeper;

    /**
     * 店主手机号, 最多存三个电话 用_分隔
     */
    private String mobile;

    /**
     * 公司名称
     */
    @Column(name = "shop_company")
    private String shopCompany;

    /**
     * 门店图标
     */
    @Column(name = "shop_img")
    private String shopImg;

    /**
     * 门店电话
     */
    @Column(name = "shop_tel")
    private String shopTel;

    /**
     * 门店QQ
     */
    @Column(name = "shop_qq")
    private String shopQq;

    /**
     * 门店旺旺号
     */
    @Column(name = "shop_ww")
    private String shopWw;

    /**
     * 门店地址
     */
    @Column(name = "shop_address")
    private String shopAddress;

    /**
     * 银行ID
     */
    @Column(name = "bank_id")
    private Integer bankId;

    /**
     * 银行卡号
     */
    @Column(name = "bank_no")
    private String bankNo;

    /**
     * 银行卡所有人名称
     */
    @Column(name = "bank_user_name")
    private String bankUserName;

    /**
     * 是否能开发票 1:能 0:不能
     */
    @Column(name = "is_invoice")
    private Byte isInvoice;

    /**
     * 发票说明
     */
    @Column(name = "invoice_remarks")
    private String invoiceRemarks;

    /**
     * 营业开始时间
     */
    @Column(name = "service_start_time")
    private Date serviceStartTime;

    /**
     * 营业结束时间
     */
    @Column(name = "service_end_time")
    private Date serviceEndTime;

    /**
     * 默认运费
     */
    private Integer freight;

    /**
     * 门店状态 1:营业中 0：休息中
     */
    @Column(name = "shop_active")
    private Byte shopActive;

    /**
     * 门店状态 -2:已停止 -1:拒绝 0：未审核 1:已审核
     */
    @Column(name = "shop_status")
    private Byte shopStatus;

    /**
     * 状态说明 一般用于停止和拒绝说明
     */
    @Column(name = "status_desc")
    private String statusDesc;

    /**
     * 删除标志 -1:删除 1:有效
     */
    @Column(name = "data_flag")
    private Byte dataFlag;

    /**
     * 	商家钱包
     */
    @Column(name = "shop_money")
    private BigDecimal shopMoney;

    /**
     * 冻结金额
     */
    @Column(name = "lock_money")
    private BigDecimal lockMoney;

    /**
     * 未结算的订单数
     */
    @Column(name = "no_settled_order_num")
    private Integer noSettledOrderNum;

    /**
     * 未结算的订单佣金
     */
    @Column(name = "no_settled_order_fee")
    private BigDecimal noSettledOrderFee;

    /**
     * 需缴纳的佣金
     */
    @Column(name = "payment_money")
    private BigDecimal paymentMoney;

    /**
     * 银行账号开卡地区ID
     */
    @Column(name = "bank_region_id")
    private Integer bankRegionId;

    /**
     * 银行账号开卡地区ID路径
     */
    @Column(name = "bank_region_id_path")
    private String bankRegionIdPath;

    /**
     * 申请状态 -1:审批失败 0:填写中 1:待处理 2:申请通过
     */
    @Column(name = "apply_status")
    private Byte applyStatus;

    /**
     * 申请描述
     */
    @Column(name = "apply_desc")
    private String applyDesc;

    /**
     * 申请时间
     */
    @Column(name = "apply_time")
    private Date applyTime;

    /**
     * 申请步数
     */
    @Column(name = "apply_step")
    private Byte applyStep;

    /**
     * 店铺公告
     */
    @Column(name = "shop_notice")
    private String shopNotice;

    /**
     * 充值金额
     */
    @Column(name = "recharge_money")
    private BigDecimal rechargeMoney;

    /**
     * 经度
     */
    private Double longitude;

    /**
     * 维度
     */
    private Double latitude;

    /**
     * 显示门店时地图放大的级别
     */
    @Column(name = "map_level")
    private Integer mapLevel;

    /**
     * 创建时间
     */
    @Column(name = "create_time")
    private Date createTime;

    /**
     * 更新时间
     */
    @Column(name = "update_time")
    private Date updateTime;

    @Transient
    private ShopUser shopUser;
}